﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreEA;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data;

namespace WPF_DbCenter.CommonMethod
{
    class MySqlEnginer:IDbEnginer
    {
        public static readonly string GetColumnSchemaInfoString = "SELECT * FROM INFORMATION_SCHEMA.COLUMNS";

        internal MySqlEnginer()
        {
            _customHandler = new CoreE(CoreE.UsedDatabaseType.MySql).X_Handler;
        }

        private ICoreEAHander _customHandler;
        /// <summary>
        /// My Core Handler
        /// </summary>
        CoreEA.ICoreEAHander IDbEnginer.CustomHandler
        {
            get { return _customHandler; }
        }

        bool IDbEnginer.OpenDatabase(string dbName, string pwd, OpenModeClass curOpenMode)
        {
            throw new NotImplementedException();
        }

        #region IDbEnginer Members

        bool IDbEnginer.CreateDataBase(string dbName, string pwd, bool Encrypt)
        {
            throw new NotImplementedException();
        }

        bool IDbEnginer.CreateDataBase(string dbName)
        {
            throw new NotImplementedException();
        }

        bool IDbEnginer.CreateDataBase(string dbName, string pwd)
        {
            throw new NotImplementedException();
        }

        bool IDbEnginer.OpenDatabase(string dbName, string pwd)
        {
            throw new NotImplementedException();
        }

        bool IDbEnginer.OpenDatabase(string dbName)
        {
            throw new NotImplementedException();
        }

        Database IDbEnginer.DbHandler
        {
            get { throw new NotImplementedException(); }
        }

        DataSet IDbEnginer.GetColumnInfoFromTable(string tableName)
        {
            throw new NotImplementedException();
        }

        DataSet IDbEnginer.GetIndexInfoFromTable(string tableName)
        {
            throw new NotImplementedException();
        }

        DataSet IDbEnginer.GetKeyColumnInfoFromTable(string tableName)
        {
            throw new NotImplementedException();
        }

        DataSet IDbEnginer.GetProviderInfoFromTable(string tableName)
        {
            throw new NotImplementedException();
        }

        DataSet IDbEnginer.GetSupportedDbType()
        {
            throw new NotImplementedException();
        }

        List<string> IDbEnginer.GetColumnNameListFromTable(string tableName)
        {
            throw new NotImplementedException();
        }

        List<string> IDbEnginer.GetIndexNameListFromTable(string tableName)
        {
            throw new NotImplementedException();
        }

        List<string> IDbEnginer.GetTableList()
        {
            throw new NotImplementedException();
        }

        List<string> IDbEnginer.TableList
        {
            get { throw new NotImplementedException(); }
        }

        bool IDbEnginer.InsertData(string tableName, List<string> columnName, List<string> columnValue, List<System.Data.DbType> types)
        {
            throw new NotImplementedException();
        }

        int IDbEnginer.GetTableMaxLength
        {
            get { throw new NotImplementedException(); }
        }

        bool IDbEnginer.ExecuteSimpleCommand(string cmd)
        {
            throw new NotImplementedException();
        }

        bool IDbEnginer.CreateTableWithSchemaInfo(object args, string tableName)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IDisposable Members

        void IDisposable.Dispose()
        {
            if (_customHandler != null)
            {
                if (_customHandler.IsOpened)
                {
                    _customHandler.Close();
                }
            }
        }

        #endregion
    }
}
